Optimal. Leaf size=410 \[ -\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (s+t \log \left (i (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (s+t \log \left (i (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (i (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {p r \left (s+t \log \left (i (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {q r \left (s+t \log \left (i (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}+\frac {2 n p r t \left (s+t \log \left (i (g+h x)^n\right )\right ) \text {Li}_3\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}+\frac {2 n q r t \left (s+t \log \left (i (g+h x)^n\right )\right ) \text {Li}_3\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}-\frac {2 n^2 p r t^2 \text {Li}_4\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {2 n^2 q r t^2 \text {Li}_4\left (\frac {d (g+h x)}{d g-c h}\right )}{h k} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 410, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 6, integrand size = 48, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2585, 2443,
2481, 2421, 2430, 6724} \begin {gather*} -\frac {p r \text {PolyLog}\left (2,\frac {b (g+h x)}{b g-a h}\right ) \left (t \log \left (i (g+h x)^n\right )+s\right )^2}{h k}+\frac {2 n p r t \text {PolyLog}\left (3,\frac {b (g+h x)}{b g-a h}\right ) \left (t \log \left (i (g+h x)^n\right )+s\right )}{h k}-\frac {2 n^2 p r t^2 \text {PolyLog}\left (4,\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {q r \text {PolyLog}\left (2,\frac {d (g+h x)}{d g-c h}\right ) \left (t \log \left (i (g+h x)^n\right )+s\right )^2}{h k}+\frac {2 n q r t \text {PolyLog}\left (3,\frac {d (g+h x)}{d g-c h}\right ) \left (t \log \left (i (g+h x)^n\right )+s\right )}{h k}-\frac {2 n^2 q r t^2 \text {PolyLog}\left (4,\frac {d (g+h x)}{d g-c h}\right )}{h k}+\frac {\left (t \log \left (i (g+h x)^n\right )+s\right )^3 \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{3 h k n t}-\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (t \log \left (i (g+h x)^n\right )+s\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (t \log \left (i (g+h x)^n\right )+s\right )^3}{3 h k n t} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2421
Rule 2430
Rule 2443
Rule 2481
Rule 2585
Rule 6724
Rubi steps
\begin {align*} \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^2}{g k+h k x} \, dx &=\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {(b p r) \int \frac {\left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{a+b x} \, dx}{3 h k n t}-\frac {(d q r) \int \frac {\left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{c+d x} \, dx}{3 h k n t}\\ &=-\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {(p r) \int \frac {\log \left (\frac {h (a+b x)}{-b g+a h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^2}{g+h x} \, dx}{k}+\frac {(q r) \int \frac {\log \left (\frac {h (c+d x)}{-d g+c h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^2}{g+h x} \, dx}{k}\\ &=-\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {(p r) \text {Subst}\left (\int \frac {\left (s+t \log \left (51 x^n\right )\right )^2 \log \left (\frac {h \left (\frac {-b g+a h}{h}+\frac {b x}{h}\right )}{-b g+a h}\right )}{x} \, dx,x,g+h x\right )}{h k}+\frac {(q r) \text {Subst}\left (\int \frac {\left (s+t \log \left (51 x^n\right )\right )^2 \log \left (\frac {h \left (\frac {-d g+c h}{h}+\frac {d x}{h}\right )}{-d g+c h}\right )}{x} \, dx,x,g+h x\right )}{h k}\\ &=-\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {p r \left (s+t \log \left (51 (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {q r \left (s+t \log \left (51 (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}+\frac {(2 n p r t) \text {Subst}\left (\int \frac {\left (s+t \log \left (51 x^n\right )\right ) \text {Li}_2\left (-\frac {b x}{-b g+a h}\right )}{x} \, dx,x,g+h x\right )}{h k}+\frac {(2 n q r t) \text {Subst}\left (\int \frac {\left (s+t \log \left (51 x^n\right )\right ) \text {Li}_2\left (-\frac {d x}{-d g+c h}\right )}{x} \, dx,x,g+h x\right )}{h k}\\ &=-\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {p r \left (s+t \log \left (51 (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {q r \left (s+t \log \left (51 (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}+\frac {2 n p r t \left (s+t \log \left (51 (g+h x)^n\right )\right ) \text {Li}_3\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}+\frac {2 n q r t \left (s+t \log \left (51 (g+h x)^n\right )\right ) \text {Li}_3\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}-\frac {\left (2 n^2 p r t^2\right ) \text {Subst}\left (\int \frac {\text {Li}_3\left (-\frac {b x}{-b g+a h}\right )}{x} \, dx,x,g+h x\right )}{h k}-\frac {\left (2 n^2 q r t^2\right ) \text {Subst}\left (\int \frac {\text {Li}_3\left (-\frac {d x}{-d g+c h}\right )}{x} \, dx,x,g+h x\right )}{h k}\\ &=-\frac {p r \log \left (-\frac {h (a+b x)}{b g-a h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {q r \log \left (-\frac {h (c+d x)}{d g-c h}\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}+\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \left (s+t \log \left (51 (g+h x)^n\right )\right )^3}{3 h k n t}-\frac {p r \left (s+t \log \left (51 (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {q r \left (s+t \log \left (51 (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}+\frac {2 n p r t \left (s+t \log \left (51 (g+h x)^n\right )\right ) \text {Li}_3\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}+\frac {2 n q r t \left (s+t \log \left (51 (g+h x)^n\right )\right ) \text {Li}_3\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}-\frac {2 n^2 p r t^2 \text {Li}_4\left (\frac {b (g+h x)}{b g-a h}\right )}{h k}-\frac {2 n^2 q r t^2 \text {Li}_4\left (\frac {d (g+h x)}{d g-c h}\right )}{h k}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(958\) vs. \(2(410)=820\).
time = 6.13, size = 958, normalized size = 2.34 \begin {gather*} -\frac {3 p r s^2 \log \left (\frac {h (a+b x)}{-b g+a h}\right ) \log (g+h x)+3 q r s^2 \log \left (\frac {h (c+d x)}{-d g+c h}\right ) \log (g+h x)-3 s^2 \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \log (g+h x)-3 n p r s t \log \left (\frac {h (a+b x)}{-b g+a h}\right ) \log ^2(g+h x)-3 n q r s t \log \left (\frac {h (c+d x)}{-d g+c h}\right ) \log ^2(g+h x)+3 n s t \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \log ^2(g+h x)+n^2 p r t^2 \log \left (\frac {h (a+b x)}{-b g+a h}\right ) \log ^3(g+h x)+n^2 q r t^2 \log \left (\frac {h (c+d x)}{-d g+c h}\right ) \log ^3(g+h x)-n^2 t^2 \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \log ^3(g+h x)+6 p r s t \log \left (\frac {h (a+b x)}{-b g+a h}\right ) \log (g+h x) \log \left (i (g+h x)^n\right )+6 q r s t \log \left (\frac {h (c+d x)}{-d g+c h}\right ) \log (g+h x) \log \left (i (g+h x)^n\right )-6 s t \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \log (g+h x) \log \left (i (g+h x)^n\right )-3 n p r t^2 \log \left (\frac {h (a+b x)}{-b g+a h}\right ) \log ^2(g+h x) \log \left (i (g+h x)^n\right )-3 n q r t^2 \log \left (\frac {h (c+d x)}{-d g+c h}\right ) \log ^2(g+h x) \log \left (i (g+h x)^n\right )+3 n t^2 \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \log ^2(g+h x) \log \left (i (g+h x)^n\right )+3 p r t^2 \log \left (\frac {h (a+b x)}{-b g+a h}\right ) \log (g+h x) \log ^2\left (i (g+h x)^n\right )+3 q r t^2 \log \left (\frac {h (c+d x)}{-d g+c h}\right ) \log (g+h x) \log ^2\left (i (g+h x)^n\right )-3 t^2 \log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right ) \log (g+h x) \log ^2\left (i (g+h x)^n\right )+3 p r \left (s+t \log \left (i (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {b (g+h x)}{b g-a h}\right )+3 q r \left (s+t \log \left (i (g+h x)^n\right )\right )^2 \text {Li}_2\left (\frac {d (g+h x)}{d g-c h}\right )-6 n p r s t \text {Li}_3\left (\frac {b (g+h x)}{b g-a h}\right )-6 n p r t^2 \log \left (i (g+h x)^n\right ) \text {Li}_3\left (\frac {b (g+h x)}{b g-a h}\right )-6 n q r s t \text {Li}_3\left (\frac {d (g+h x)}{d g-c h}\right )-6 n q r t^2 \log \left (i (g+h x)^n\right ) \text {Li}_3\left (\frac {d (g+h x)}{d g-c h}\right )+6 n^2 p r t^2 \text {Li}_4\left (\frac {b (g+h x)}{b g-a h}\right )+6 n^2 q r t^2 \text {Li}_4\left (\frac {d (g+h x)}{d g-c h}\right )}{3 h k} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.28, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (e \left (f \left (b x +a \right )^{p} \left (d x +c \right )^{q}\right )^{r}\right ) \left (s +t \ln \left (i \left (h x +g \right )^{n}\right )\right )^{2}}{h k x +g k}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (e\,{\left (f\,{\left (a+b\,x\right )}^p\,{\left (c+d\,x\right )}^q\right )}^r\right )\,{\left (s+t\,\ln \left (i\,{\left (g+h\,x\right )}^n\right )\right )}^2}{g\,k+h\,k\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________